<%@page import="edu.hwadee.entity.Car"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<% 
		if(request.getAttribute("dooption") == null || (boolean)request.getAttribute("dooption") == false) {
	 %>
	<s:action name="showCar" namespace="/jsp"></s:action>
	<%  
		}
		request.setAttribute("dooption", false);
		if(request.getAttribute("dooptionS") == null || (boolean)request.getAttribute("dooption") == false) {
		
	 %>
	<s:action name="showAllCarsafety" namespace="/jsp"></s:action>
	<%
		}
		request.setAttribute("dooptionS", false);
	%>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>攀枝花物流管理系统</title>

<link href="../css/bootstrap-combined.min.css" rel="stylesheet" type="text/css">
<link href="../css/layoutit.css" rel="stylesheet" type="text/css">
<link href="../css/bootstrap.min.css" rel="stylesheet" type="text/css">
<script src="../js/jquery-2.0.0.min.js"></script>
<script src="../js/jquery-ui.js"></script>
<script src="../js/jquery.htmlClean.js"></script>
<!-- <script src="../js/scripts.js"></script> -->
<script src="../js/bootstrap.min.js"></script>


</head>
<body style="margin:0;">


<div class="container-fluid">
	<div class="row-fluid">
		<div class="span12">
			<img alt="140x140" src="img/a.jpg" />
		</div>
	</div>
	<div class="row-fluid">
		<div class="span12">
			<div class="navbar">
				<div class="navbar-inner">
					<div class="nav-collapse collapse navbar-responsive-collapse">
						<ul class="nav pull-right">
							<li>
								<span class="badge">1</span>
							</li>
							<li>
								<a href="./ILIP_Inside_MessageCenter.html">个人信息</a>
							</li>
							<li class="divider-vertical">
							</li>
							<li>
								 <div class="btn-group">
                  <button class="btn ">用户名</button>
                  <button data-toggle="dropdown" class="btn dropdown-toggle"><span class="caret"></span></button>
                  <ul class="dropdown-menu" contenteditable="true">
                    <li><a href="#">设置</a></li>
                    <li><a href="#">退出登录</a></li>
                  </ul>
                </div>
							</li>
						</ul>
					</div>
					
				</div>
			</div>
	</div>
	<div class="row-fluid">
		<div class="span2">
			<div class="accordion" id="accordion-menu">
				<div class="accordion-group">
					<div class="accordion-heading">
						<a class="accordion-toggle" data-parent="#accordion-menu" data-toggle="collapse" href="#accordion-element-1">基本信息管理</a>
					</div>
					<div class="accordion-body in collapse" id="accordion-element-1">
						<div class="accordion-inner">
							<ul>
								<li>
									<a href="./ILIP_Inside_PersonManagement.html">人员信息管理</a>
								</li>
								<li>
									<a href="./ILIP_Inside_CarManagement.jsp">车辆信息管理</a>
								</li>
								<li>
									<a href="./ILIP_Inside_AddressManagement.html">地址信息管理</a>
								</li>
								<li>
									<a href="#">公司信息管理</a>
								</li>
								<li>
									<a href="./ILIP_Inside_MaterialManagement.jsp">物资信息管理</a>
								</li>
								<li>
									<a href="./ILIP_Inside_DocumentManagement.html">证件信息管理</a>
								</li>
								<li>
									<a href="#">货物信息管理</a>
								</li>
								<li>
									<a href="#">建筑构物信息管理</a>
								</li>
								<li>
									<a href="#">机电设备信息管理</a>
								</li>
							</ul>
						</div>
					</div>
				</div>
				<div class="accordion-group">
					<div class="accordion-heading">
						<a class="accordion-toggle" data-parent="#accordion-menu" data-toggle="collapse" 							href="#accordion-element-2">购销存管理</a>
					</div>
					<div class="accordion-body collapse" id="accordion-element-2">
						<div class="accordion-inner">
							<ul>
								<li>
									<a href="./ILIP_Inside_ConsumableManagement_Store.html">办公耗材管理</a>
								</li>
								<li>
									<a href="./ILIP_Inside_BuyAndSales_Management_Materials.html">物资购销存管理</a>
								</li>
								<li>
									<a href="#">汽车购销存管理</a>
								</li>
								<li>
									<a href="#">货物购销存管理</a>
								</li>
								<li>
									<a href="#">建筑构物租售管理</a>
								</li>
							</ul>
						</div>
					</div>
				</div>
				<div class="accordion-group">
					<div class="accordion-heading">
						<a class="accordion-toggle" data-parent="#accordion-menu" data-toggle="collapse" 							href="#accordion-element-3">汽车检修管理</a>
					</div>
					<div class="accordion-body collapse" id="accordion-element-3">
						<div class="accordion-inner">
							<ul>
								<li>
									<a href="./ILIP_Inside_CarFix_Management_Accident.html">车辆事故信息管理</a>
								</li>
								<li>
									<a href="./ILIP_Inside_CarFix_Management_Fix.html">汽车检修信息管理</a>
								</li>
								<li>
									<a href="./ILIP_Inside_CarFix_Management_Material.html">物资使用信息管理</a>
								</li>
							</ul>
						</div>
					</div>
				</div>
				<div class="accordion-group">
					<div class="accordion-heading">
						<a class="accordion-toggle" data-parent="#accordion-menu" data-toggle="collapse" href="#accordion-element-4">运输调度管理</a>
					</div>
					<div class="accordion-body collapse" id="accordion-element-4">
						<div class="accordion-inner">
							<ul>
								<li>
									<a href="./ILIP_Inside_TransportationTaskManagement.html">运输任务管理</a>
								</li>
								<li>
									<a href="./ILIP_Inside_CarOperationManagement.html">单车运营记录管理</a>
								</li>
								<li>
									<a href="#">承运商业务管理</a>
								</li>
								<li>
									<a href="./ILIP_Inside_RailTransport.html">铁路运输代办管理</a>
								</li>
							</ul>
						</div>
					</div>
				</div>
				<div class="accordion-group">
					<div class="accordion-heading">
						<a class="accordion-toggle" data-parent="#accordion-menu" data-toggle="collapse" href="#accordion-element-5">对外合作平台管理</a>
					</div>
					<div class="accordion-body collapse" id="accordion-element-5">
						<div class="accordion-inner">
							<ul>
								<li>
									<a href="./ILIP_Inside_Cooperation_About.html">公司简介公告管理</a>
								</li>
								<li>
									<a href="#">供需信息管理</a>
								</li>
							</ul>
						</div>
					</div>
				</div>
				<div class="accordion-group">
					<div class="accordion-heading">
						<a class="accordion-toggle" data-parent="#accordion-menu" data-toggle="collapse" href="#accordion-element-6">数据统计分析</a>
					</div>
					<div class="accordion-body collapse" id="accordion-element-6">
						<div class="accordion-inner">
							<ul>
								<li>
									<a href="./ILIP_Inside_ReportManagement.html">周期性报表</a>
								</li>
								<li>
									<a href="./ILIP_Inside_LineChartManagement.html">线性数据折线图</a>
								</li>
								<li>
									<a href="#">业务状况分布图</a>
								</li>
								<li>
									<a href="#">产值利润柱状图</a>
								</li>
							</ul>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="span10">
			<ul class="breadcrumb">
				<li>
					<a href="./ILIP_Inside_Main.html">主页</a> <span class="divider">/</span>
				</li>
				<li>
					<a href="#">基本信息管理</a>
				</li>
				<li>
					 <span class="divider">/</span><a
							href="./ILIP_Inside_CarManagement.jsp">车辆信息管理</a>
				</li> 
			
			</ul>

			<div class="tabbable" id="tabs-385726">
						<ul class="nav nav-tabs">
							<li class="active"><a href="#car_info"
								data-toggle="tab">车辆基本信息</a></li>
							<li><a href="#carsafety_info" data-toggle="tab">车辆保险信息</a></li>
						</ul>
						<hr>
			<div class="tab-content">
				<div id="car_info" class="tab-pane active">
					<div >
				
				<form action="searchCar" method="post" class="form-search form-inline"  style="float:left;" >
					<label class="radio-inline"> <input type="radio"
											name="option" value="1" checked> 车辆编号
										</label> <label class="radio-inline"> <input type="radio"
											name="option" value="2"> 车型编号
										</label> <label class="radio-inline"> <input type="radio"
											name="option" value="3"> 人员编号
										</label> <br> <br> <input class="input-medium search-query"
											name="optionvalue" type="text" style="width: 65%"
											placeholder="输入对应条件的值进行查询" value="">
                  
                  <input type="submit" value="查找" class="btn">
                </form>
				<a href="#add_car_modal" role="button" class="btn" style="float:right;" data-toggle="modal">添加车辆信息</a>
			</div>
			<table class="table table-bordered table-hover">
				<thead>
					<tr>
						<th>
							车辆编号
						</th>
						<th>
							人员编号
						</th>
						<th>
							归属单位
						</th>
						<th>
							调度单位
						</th>
						<th>
							车牌号
						</th>
						<th>
							车型
						</th>
						<th>
							检车周期
						</th>
					</tr>
				</thead>
				<tbody>
						<s:iterator id="iterator" value="#session.carList">
					<tr>
					
					<td><s:property value="carId" /></td>
					
						<td>
							<s:property value="staff.getStaffId()" />
						</td>
						<td>
							<s:property value="companyByHold.getCompanyName()" />
						</td>
						<td>
							<s:property value="companyByControlCompany.getCompanyName()" />
						</td>
						<td>
							<s:property value="carNumber" />
						</td>
						<td>
							<s:property value="carcomplement.getCarSystem()" />
						</td>
						<td>
							<s:property value="checkCycle" />
						</td>
					<!-- '${carcomplement.getCarComplementId()}','${staff.getStaffId()}','${companyByHold.getCompanyName()}',
							 	'${companyByControlCompany.getCompanyName()}','${area.getAreaName()}','${companyByDealer.getCompanyName()}'	-->
						<td>
							 <a   role="button" class="btn" data-toggle="modal" 
							 	onclick="searchId('${carId}','${carcomplement.getCarComplementId()}','${staff.getStaffId()}','${companyByHold.getCompanyName()}','${companyByControlCompany.getCompanyName()}','${area.getAreaName()}','${companyByDealer.getCompanyName()}','${carNumber}','${brandModel}','${manufactureDate}','${origin}','${ engineNumber}',
							 	'${frameNumber}','${photo}','${color}','${carState}','${productionvalue}','${cost}','${property}',
							 	'${registeredDate}','${originValue}','${depreciationState}','${depreciationRate}','${isBlacklist}',
							 	'${hasGps}','${checkCycle}')">详细信息</a>
							 <a  role="button" class="btn" data-toggle="modal" onclick="update('${carId}')">修改</a>
							 <a  role="button" class="btn" data-toggle="modal" onclick="deleteId('${carId}')">删除</a>
						</td>
					</tr>
					</s:iterator>
				</tbody>
			</table>
			<div class="pagination pagination-centered">
				<ul>
					<li>
						<a href="#">上一页</a>
					</li>
					<li>
						<a href="#">1</a>
					</li>
					<li>
						<a href="#">2</a>
					</li>
					<li>
						<a href="#">3</a>
					</li>
					<li>
						<a href="#">4</a>
					</li>
					<li>
						<a href="#">5</a>
					</li>
					<li>
						<a href="#">下一页</a>
					</li>
				</ul>
			</div>

			
			<!-- 查看车辆基本信息 -->
			<div id="search_car_info" class="modal hide fade" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
				<div class="modal-header">
					 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
					<h3 id="myModalLabel">
						车辆详细信息
					</h3>
				</div>
				
				<div class="modal-body">
					
					<table>
						<tr>
							<td>车辆编号：</td>
							<td><input id="carID" type="text"  name="carId" readonly="readonly"></td>
						</tr>
						<tr>
							<td>车型编号：</td>
							<td><input id="carcomplement" type="text"  name="carcomplement" readonly="readonly"></td>
						</tr>
						<tr>
							<td>人员编号：</td>
							<td><input id="staff" type="text"  name="staff" readonly="readonly"></td>
						</tr>
						<tr>
							<td>归属单位：</td>
							<td><input id="companyByHold" type="text"  name="companyByHold"></td>
						</tr>
						<tr>
							<td>调度单位：</td>
							<td><input id="companyByControlCompany" type="text"  name="companyByControlCompany"></td>
						</tr>
						

						<tr>
							<td>停车点：</td>
							<td><input id="area" type="text" value="" name="area"></td>
						</tr>
						<tr>
							<td>车辆经销商：</td>
							<td><input id="companyByDealer" type="text" value="" name="companyByDealer">
							</td>
						</tr>

						<tr>
							<td>车牌号：</td>
							<td><input id="carNumber" type="text" value="" name="carNumber"></td>
						</tr>
						<tr>
							<td>厂牌型号：</td>
							<td><input id="brandModel" type="text" value="" name="brandModel"></td>
						</tr>

					<tr>
							<td>出厂日期：</td>
							<td><input id="manufactureDate" type="text" value="" name="manufactureDate"></td>
						</tr>
						<tr>
							<td>车辆来历：</td>
							<td><input id="origin" type="text" name="origin"></td>
						</tr>
						<tr>
							<td>发动机号码：</td>
							<td>
								<input id="engineNumber" type="text" value="" name="engineNumber">
							</td>
						</tr>
						<tr>
							<td>车架号码：</td>
								
							<td>
								<input id="frameNumber" type="text" value="" name="frameNumber">
							</td>
						</tr>
						<tr>
							<td>车辆照片：</td>
							<td><input id="photo" type="image" name="photo"></td>
						</tr>
						<tr>
							<td>车身颜色：</td>
							<td><input id="color" type="text" value="" name="color"></td>
						</tr>
						<tr>
							<td>车辆状态：</td>
							<td><input id="carState" type="text" value="" name="carState"></td>
						</tr>
						<tr>
							<td>年计划产值：</td>
							<td><input id="productionvalue" type="text" value="" name="productionvalue"></td>
						</tr>
						<tr>
							<td>固定费用指标：</td>
							<td><input id="cost" type="text" value="" name="cost"></td>
						</tr>

						<tr>
							<td>使用性质：</td>
							<td><input id="property" type="text" value="" name="property">
							</td>
						</tr>
						<tr>
							<td>上户时间：</td>
							<td><input id="registeredDate" type="text" value="" name="registeredDate"></td>
						</tr>
<tr>
							<td>初始原值：</td>
							<td><input id="originValue" type="text" value="" name="originValue"></td>
						</tr>
						<tr>
							<td>折旧状态：</td>
							<td><input id="depreciationState" type="text" value="" name="depreciationState">
							</td>
						</tr>
<tr>
							<td>折旧率：</td>
							<td><input id="depreciationRate" type="text" value="" name="depreciationRate"></td>
						</tr>

						<tr>
							<td>是否黑名单：</td>
							<td><input id="isBlacklist" type="text" value="" name="isBlacklist"></td>
						</tr>
						<tr>
							<td>是否安装GPS：</td>
							<td><input id="hasGps" type="text" value="" name="hasGps"></td>
						</tr><tr>
							<td>检车周期：</td>
							<td><input id="checkCycle" type="text" value="" name="checkCycle"></td>
						</tr>
					</table>
				</div>
				<div class="modal-footer">
					 <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button> 
				</div>
				
			</div>


			
			<!-- 添加车辆信息 -->
			<div id="add_car_modal" class="modal hide fade" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
				<div class="modal-header">
					 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
					 
					 
					<h3 id="myModalLabel">
						添加车辆信息
					</h3>
				</div>
				<form action="addCar" method="post">
				<div class="modal-body">
					<table>
						
						<tr>
							<td>车型编号：</td>
							<td>
								<select name="carComplementId">
									<option value="47389247">本田236</option>
									<option value="47389248">本田</option>	
								</select></td>
						</tr>
						<tr>
							<td>人员编号：</td>
							<td>
								<select name="staffId">
									<option value="666666">李四</option>
									<option value="333333">王五</option>	
								</select></td>
						</tr>
						<tr>
							<td>归属单位：</td>
							<td>
								<select name="companyByHoldId">
									<option value="111222">浦发银行</option>
									<option value="111223">哒哒物流</option>	
								</select></td>
						</tr>
						<tr>
							<td>调度单位：</td>
							<td>
								
								<select name="companyByControlCompanyId">
									<option value="11122201">浦发银行分行</option>
									<option value="111333">审核公司</option>	
								</select></td>
						</tr>
						

						<tr>
							<td>停车点：</td>
							<td>
								<select name="areaId">
									<option value="123456">成都市</option>
									<option value="1234561">德源县</option>	
								</select></td>
						</tr>
						<tr>
							<td>车辆经销商：</td>
							<td><select name="companyByDealerId">
									<option value="11122201">浦发银行分行</option>
									<option value="111333">审核公司</option>	
								</select></td>
						</tr>

						<tr>
							<td>车牌号：</td>
							<td><input type="text" value="" name="carNumber"></td>
						</tr>
						<tr>
							<td>厂牌型号：</td>
							<td><input type="text" value="" name="brandModel"></td>
						</tr>

					<tr>
							<td>出厂日期：</td>
							<td><input type="Date" value="" name="manufactureDate"></td>
						</tr>
						<tr>
							<td>车辆来历：</td>
							<td><select name="origin">
									<option value="1">新购</option>
									<option value="2">转让</option>	
								</select></td>
						</tr>
						<tr>
							<td>发动机号码：</td>
							<td>
								<input type="text" value="" name="engineNumber">
							</td>
						</tr>
						<tr>
							<td>车架号码：</td>
								
							<td>
								<input type="text" value="" name="frameNumber">
							</td>
						</tr>
						<tr>
							<td>车辆照片：</td>
							<td><input type="image" name="photo"></td>
						</tr>
						<tr>
							<td>车身颜色：</td>
							<td><input type="text" value="" name="color"></td>
						</tr>
						<tr>
							<td>车辆状态：</td>
							<td><select name="carState">
									<option value="1">修检</option>
									<option value="2">业务中</option>
									<option value="3">空闲</option>
									<option value="4">报废</option>
									<option value="5">拍卖</option>
									<option value="6">报停</option>
									
								</select></td>
						</tr>
						<tr>
							<td>年计划产值：</td>
							<td><input type="text" value="" name="productionvalue"></td>
						</tr>
						<tr>
							<td>固定费用指标：</td>
							<td><input type="text" value="" name="cost"></td>
						</tr>

						<tr>
							<td>使用性质：</td>
							<td><select name="property">
									<option value="1">营业</option>
									<option value="2">非营业</option>
									
								</select></td>
						</tr>
						<tr>
							<td>上户时间：</td>
							<td><input type="Date" value="" name="registeredDate"></td>
						</tr>
<tr>
							<td>初始原值：</td>
							<td><input type="text" value="" name="originValue"></td>
						</tr>
						<tr>
							<td>折旧状态：</td>
							<td><select name="depreciationState">
									<option value="1">新购</option>
									<option value="2">正常折扣</option>
									<option value="3">已提足</option>
								</select></td>
						</tr>
<tr>
							<td>折旧率：</td>
							<td><input type="text" value="" name="depreciationRate"></td>
						</tr>

						<tr>
							<td>是否黑名单：</td>
							<td><select name="isBlacklist">
									<option value="true">是</option>
									<option value="false">否</option>
									
								</select></td>
						</tr>
						<tr>
							<td>是否安装GPS：</td>
							<td>
								<select name="hasGps">
									<option value="true">是</option>
									<option value="false">否</option>
									
								</select>
							</td>
						</tr><tr>
							<td>检车周期：</td>
							<td><input type="text" value="" name="checkCycle"></td>
						</tr>
					</table>
				</div>
				<div class="modal-footer">
					 <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button> 
					 <input  type="submit" class="btn btn-primary" value="添加">
				</div>
				</form>
			</div>
		
			<!-- 修改车辆信息 -->
			<div id="update_car_info" class="modal hide fade" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
				<div class="modal-header">
					 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
					<h3 id="myModalLabel">
						修改车辆信息
					</h3>
				</div>
				<form action="updateCar" method="post">
				<div class="modal-body">
					<table>
						
						<tr>
							<td>车辆编号</td><td><input id="carId" name="carId" readonly="readonly"></td>
						</tr>
						
						<tr>
							<td>车型编号：</td>
							<td>
								<select name="carComplementId">
									<option value="47389247">本田236</option>
									<option value="47389248">本田</option>	
								</select></td>
						</tr>
						<tr>
							<td>人员编号：</td>
							<td>
								<select name="staffId">
									<option value="666666">李四</option>
									<option value="333333">王五</option>	
								</select></td>
						</tr>
						<tr>
							<td>归属单位：</td>
							<td>
								<select name="companyByHoldId">
									<option value="111222">浦发银行</option>
									<option value="111223">哒哒物流</option>	
								</select></td>
						</tr>
						<tr>
							<td>调度单位：</td>
							<td>
								
								<select name="companyByControlCompanyId">
									<option value="11122201">浦发银行分行</option>
									<option value="111333">审核公司</option>	
								</select></td>
						</tr>
						

						<tr>
							<td>停车点：</td>
							<td>
								<select name="areaId">
									<option value="123456">成都市</option>
									<option value="1234561">德源县</option>	
								</select></td>
						</tr>
						<tr>
							<td>车辆经销商：</td>
							<td><select name="companyByDealerId">
									<option value="11122201">浦发银行分行</option>
									<option value="111333">审核公司</option>	
								</select></td>
						</tr>

						<tr>
							<td>车牌号：</td>
							<td><input type="text" value="" name="carNumber"></td>
						</tr>
						<tr>
							<td>厂牌型号：</td>
							<td><input type="text" value="" name="brandModel"></td>
						</tr>

					<tr>
							<td>出厂日期：</td>
							<td><input type="Date" value="" name="manufactureDate"></td>
						</tr>
						<tr>
							<td>车辆来历：</td>
							<td><select name="origin">
									<option value="1">新购</option>
									<option value="2">转让</option>	
								</select></td>
						</tr>
						<tr>
							<td>发动机号码：</td>
							<td>
								<input type="text" value="" name="engineNumber">
							</td>
						</tr>
						<tr>
							<td>车架号码：</td>
								
							<td>
								<input type="text" value="" name="frameNumber">
							</td>
						</tr>
						<tr>
							<td>车辆照片：</td>
							<td><input type="image" name="photo"></td>
						</tr>
						<tr>
							<td>车身颜色：</td>
							<td><input type="text" value="" name="color"></td>
						</tr>
						<tr>
							<td>车辆状态：</td>
							<td><select name="carState">
									<option value="1">修检</option>
									<option value="2">业务中</option>
									<option value="3">空闲</option>
									<option value="4">报废</option>
									<option value="5">拍卖</option>
									<option value="6">报停</option>
									
								</select></td>
						</tr>
						<tr>
							<td>年计划产值：</td>
							<td><input type="text" value="" name="productionvalue"></td>
						</tr>
						<tr>
							<td>固定费用指标：</td>
							<td><input type="text" value="" name="cost"></td>
						</tr>

						<tr>
							<td>使用性质：</td>
							<td><select name="property">
									<option value="1">营业</option>
									<option value="2">非营业</option>
									
								</select></td>
						</tr>
						<tr>
							<td>上户时间：</td>
							<td><input type="Date" value="" name="registeredDate"></td>
						</tr>
<tr>
							<td>初始原值：</td>
							<td><input type="text" value="" name="originValue"></td>
						</tr>
						<tr>
							<td>折旧状态：</td>
							<td><select name="depreciationState">
									<option value="1">新购</option>
									<option value="2">正常折扣</option>
									<option value="3">已提足</option>
								</select></td>
						</tr>
<tr>
							<td>折旧率：</td>
							<td><input type="text" value="" name="depreciationRate"></td>
						</tr>

						<tr>
							<td>是否黑名单：</td>
							<td><select name="isBlacklist">
									<option value="true">是</option>
									<option value="false">否</option>
									
								</select></td>
						</tr>
						<tr>
							<td>是否安装GPS：</td>
							<td>
								<select name="hasGps">
									<option value="true">是</option>
									<option value="false">否</option>
									
								</select>
							</td>
						</tr><tr>
							<td>检车周期：</td>
							<td><input type="text" value="" name="checkCycle"></td>
						</tr>
					</table>
				</div>
				<div class="modal-footer">
					 <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button> 
					 <input  type="submit" class="btn btn-primary" value="确认修改">
				</div>
				</form>
			</div>
			
			<!-- 删除车辆信息 -->
				<div id="delete_car_info" class="modal hide fade"
									role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
									<div class="modal-header">
										<button type="button" class="close" data-dismiss="modal"
											aria-hidden="true">×</button>
									</div>
									<form action="deleteCar" method="post">
										<input id="delete" type="hidden" name="carId" value="">
										<div class="modal-body">
											<h4>是否确认删除</h4>
										</div>
										<div class="modal-footer">
											<button type="submit" class="btn btn-primary">确定</button>
										</div>
									</form>
								</div>
			
			</div>
		
		<!-- 车辆保险信息 -->
				<div id="carsafety_info" class="tab-pane">
						<div >
				
				<form action="searchCar" method="post" class="form-search form-inline"  style="float:left;" >
					<label class="radio-inline"> <input type="radio"
											name="option" value="1" checked> 车辆保险编号
										</label> <label class="radio-inline"> <input type="radio"
											name="option" value="2"> 车辆编号
										</label> <label class="radio-inline"> <input type="radio"
											name="option" value="3"> 保险经办人
										</label> 
										<label class="radio-inline"> <input type="radio"
											name="option" value="4"> 险种
										</label> <br> <br> <input class="input-medium search-query"
											name="optionvalue" type="text" style="width: 65%"
											placeholder="输入对应条件的值进行查询" value="">
                  
                  <input type="submit" value="查找" class="btn">
                </form>
				<a href="#add_carsafety_modal" role="button" class="btn" style="float:right;" data-toggle="modal">添加车辆保险信息</a>
			</div>
			
			<table class="table table-bordered table-hover">
				<thead>
					<tr>
						<th>
							车辆保险编号
						</th>
						<th>
							保险经办人
						</th>
						<th>
							车辆编号
						</th>
						<th>
							险种
						</th>
						<th>
							保险开始日期
						</th>
						<th>
							保险到期日期
						</th>
						<th>
							保险额
						</th>
						<th>
							保险金
						</th>
						<th>
							险单号
						</th>
						<th>
							险单扫描件
						</th>
						<th>
							领取日期
						</th>
					</tr>
				</thead>
				<tbody>
						<s:iterator id="iterator" value="#session.carsafetyList">
					<tr>
					
					<td><s:property value="carsafetyId" /></td>
					
						<td>
							<s:property value="staff.getTrueName()" />
						</td>
						<td>
							<s:property value="car.getCarId()" />
						</td>
						<td>
							<s:property value="safetyType" />
						</td>
						<td>
							<s:property value="startDate" />
						</td>
						<td>
							<s:property value="endDate" />
						</td>
						<td>
							<s:property value="amount" />
						</td>
						<td>
							<s:property value="benefit" />
						</td>
						<td>
							<s:property value="policy" />
						</td>
						<td>
							<s:property value="scannedCopy" />
						</td>
						<td>
							<s:property value="receiveDate" />
						</td>
						
					
						<td>
							 <a  role="button" class="btn" data-toggle="modal" onclick="updateCarsafety('${carsafetyId}')">修改</a>
							 <a  role="button" class="btn" data-toggle="modal" onclick="deleteCarsafety('${carsafetyId}')">删除</a>
						</td>
					</tr>
					</s:iterator>
				</tbody>
			</table>
			<div class="pagination pagination-centered">
				<ul>
					<li>
						<a href="#">上一页</a>
					</li>
					<li>
						<a href="#">1</a>
					</li>
					<li>
						<a href="#">2</a>
					</li>
					<li>
						<a href="#">3</a>
					</li>
					<li>
						<a href="#">4</a>
					</li>
					<li>
						<a href="#">5</a>
					</li>
					<li>
						<a href="#">下一页</a>
					</li>
				</ul>
			</div>

			
			<!-- 添加车辆保险信息 -->
			<div id="add_carsafety_modal" class="modal hide fade" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
				<div class="modal-header">
					 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
					 
					 
					<h3 id="myModalLabel">
						添加车辆保险信息
					</h3>
				</div>
				<form action="addCarsafety" method="post">
				<div class="modal-body">
					<table>
						<tr>
							<td>车辆保险编号：</td>
							<td><input type="text"  name="carsafetyId"></td>
						</tr>
						<tr>
							<td>保险经办人：</td>
							<td>
								<select name="operator">
									<option value="666666">李四</option>
									<option value="333333">王五</option>	
								</select></td>
						</tr>
						<tr>
							<td>车辆编号：</td>
							<td>
								<select name="carId">
									<option value="489456">本田236</option>
									<option value="489457">本田</option>	
								</select></td>
						</tr>
						
						<tr>
							<td>险种：</td>
							<td>
								<select name="safetyType">
									<option value="交强险">交强险</option>
									<option value="三者险">三者险</option>	
									<option value="商业险">商业险</option>
									<option value="车损险">车损险</option>	
									<option value="车船税">车船税</option>
									
								</select></td>
						</tr>
						
					<tr>
							<td>保险开始日期：</td>
							<td><input type="Date" value="" name="startDate"></td>
						</tr>
						
						<tr>
							<td>保险到期日期：</td>
							<td><input type="Date" value="" name="endDate"></td>
						</tr>
<tr>
							<td>保险额：</td>
							<td><input type="text" value="" name="amount"></td>
						</tr>
						<tr>
							<td>保险金：</td>
							<td><input type="text" value="" name="benefit"></td>
						</tr>
						<tr>
							<td>险单号：</td>
							<td><input type="text" value="" name="policy"></td>
						</tr>
						

						<tr>
							<td>险单扫描件：</td>
							<td><input type="image" value="" name="scannedCopy"></td>
						</tr>
						<tr>
							<td>领取日期：</td>
							<td>
								<input type="Date" value="" name="receiveDate">
							</td>
						</tr>
					</table>
				</div>
				<div class="modal-footer">
					 <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button> 
					 <input  type="submit" class="btn btn-primary" value="添加">
				</div>
				</form>
			</div>
		
			<!-- 修改车辆保险信息 -->
			<div id="update_carsafety_info" class="modal hide fade" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
				<div class="modal-header">
					 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
					<h3 id="myModalLabel">
						修改车辆保险信息
					</h3>
				</div>
				<form action="updateCarsafety" method="post">
				<div class="modal-body">
					<table>
						<tr>
							<td>车辆保险编号：</td>
							<td><input id="carsafetyId" type="text"  name="carsafetyId" readonly="readonly"></td>
						</tr>
						<tr>
							<td>保险经办人：</td>
							<td>
								<select name="operator">
									<option value="666666">李四</option>
									<option value="333333">王五</option>	
								</select></td>
						</tr>
						<tr>
							<td>车辆编号：</td>
							<td>
								<select name="carId">
									<option value="489456">本田236</option>
									<option value="489457">本田</option>	
								</select></td>
						</tr>
						
						<tr>
							<td>险种：</td>
							<td>
								<select name="safetyType">
									<option value="交强险">交强险</option>
									<option value="三者险">三者险</option>	
									<option value="商业险">商业险</option>
									<option value="车损险">车损险</option>	
									<option value="车船税">车船税</option>
									
								</select></td>
						</tr>
						
					<tr>
							<td>保险开始日期：</td>
							<td><input type="Date" value="" name="startDate"></td>
						</tr>
						
						<tr>
							<td>保险到期日期：</td>
							<td><input type="Date" value="" name="endDate"></td>
						</tr>
<tr>
							<td>保险额：</td>
							<td><input type="text" value="" name="amount"></td>
						</tr>
						<tr>
							<td>保险金：</td>
							<td><input type="text" value="" name="benefit"></td>
						</tr>
						<tr>
							<td>险单号：</td>
							<td><input type="text" value="" name="policy"></td>
						</tr>
						

						<tr>
							<td>险单扫描件：</td>
							<td><input type="image" value="" name="scannedCopy"></td>
						</tr>
						<tr>
							<td>领取日期：</td>
							<td>
								<input type="Date" value="" name="receiveDate">
							</td>
						</tr>
						</table>
				</div>
				<div class="modal-footer">
					 <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button> 
					 <input  type="submit" class="btn btn-primary" value="确认修改">
				</div>
				</form>
			</div>
			
			<!-- 删除车辆保险信息 -->
				<div id="delete_carsafety_info" class="modal hide fade"
									role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
									<div class="modal-header">
										<button type="button" class="close" data-dismiss="modal"
											aria-hidden="true">×</button>
									</div>
									<form action="deleteCarsafety" method="post">
										<input id="deleteCarsafety" type="hidden" name="carsafetyId" value="">
										<div class="modal-body">
											<h4>是否确认删除</h4>
										</div>
										<div class="modal-footer">
											<button type="submit" class="btn btn-primary">确定</button>
										</div>
									</form>
								</div>
			
			</div>
			
				</div>
		</div>
		</div>
	</div>
</div>
</div>
<script type="text/javascript">


	//车辆保险信息
	$("#delete_carsafety_info").modal("hide");
	function deleteCarsafety(id) {
		$("#delete_carsafety_info").modal("show");
		var dv = document.getElementById("deleteCarsafety");
		dv.value = id;
	}

	$("#update_carsafety_info").modal("hide");
	function updateCarsafety(carsafetyId) {
		$("#update_carsafety_info").modal("show");
		document.getElementById("carsafetyId").value = carsafetyId;
	}
	







	//车辆基本信息
	$("#delete_car_info").modal("hide");
	function deleteId(id) {
		$("#delete_car_info").modal("show");
		var dv = document.getElementById("delete");
		dv.value = id;
	}

	$("#update_car_info").modal("hide");
	function update(carId) {
		$("#update_car_info").modal("show");
		document.getElementById("carId").value = carId;
	}

	/**
	carsystem,staffId,holdId,controlId,areaName,dealer,
	*/
	
	$("#search_car_info").modal("hide");
	function searchId(carId,carsystem,staffId,holdId,controlId,areaName,dealer,carNumber,brandModel,manufactureDate,origin,engineNumber,frameNumber,
			photo,color,carState,productionvalue,cost,property,registeredDate,
			originValue,depreciationState,depreciationRate,isBlacklist,hasGps,checkCycle) {
		$("#search_car_info").modal("show");
		document.getElementById("carID").value = carId;
		/**/
		document.getElementById("carcomplement").value =carsystem;
		document.getElementById("staff").value = staffId;
		document.getElementById("companyByHold").value = holdId;
		document.getElementById("companyByControlCompany").value = controlId;
		document.getElementById("area").value = areaName;
		document.getElementById("companyByDealer").value = dealer;
		
		document.getElementById("carNumber").value = carNumber;
		document.getElementById("photo").value = photo;
		document.getElementById("brandModel").value = brandModel;
		document.getElementById("manufactureDate").value = manufactureDate;
		document.getElementById("origin").value = origin;
		document.getElementById("engineNumber").value = engineNumber;
		
		document.getElementById("frameNumber").value = frameNumber;
		document.getElementById("photo").value = photo;
		document.getElementById("color").value = color;
		if(carState==1)
		{
			document.getElementById("carState").value = "修检";	//车辆状态
		}
		else if(carState==2)
		{
			document.getElementById("carState").value = "业务中";	//车辆状态
		}
		else if(carState==3)
		{
			document.getElementById("carState").value = "空闲";	//车辆状态
		}
		else if(carState==4)
		{
			document.getElementById("carState").value = "报废";	//车辆状态
		}
		else if(carState==5)
		{
			document.getElementById("carState").value = "拍卖";	//车辆状态
		}
		else if(carState==6)
		{
			document.getElementById("carState").value = "报停";	//车辆状态
		}
		
		document.getElementById("productionvalue").value = productionvalue;
		document.getElementById("cost").value = cost;
		
		if(property==1)
			{
			document.getElementById("property").value = "营业";	//使用性质
			}
		else if(property==2)
		{
		document.getElementById("depreciationState").value = "非营业";  //使用性质
			}
		
		document.getElementById("registeredDate").value = registeredDate;

		document.getElementById("originValue").value = originValue;
		
		if(depreciationState==1)
			{
			document.getElementById("depreciationState").value ="新购";  //折旧状态
			}
		else if(depreciationState==2)
			{
			document.getElementById("depreciationState").value = "正常折旧";  //折旧状态
				}
		else if(depreciationState==3)
			{document.getElementById("depreciationState").value = "已提足";  //折旧状态
			}
		
		document.getElementById("depreciationRate").value = depreciationRate;
		document.getElementById("isBlacklist").value = isBlacklist;
		document.getElementById("hasGps").value = hasGps;
		
		document.getElementById("checkCycle").value = checkCycle;
	}
	</script>
</body>
</html>